import calendar

# weekday=["monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
# def year_select(year):
#     if calendar.isleap(year):
#         j = calendar.weekday(year, 1, 1)
#         if j == 6:
#             print(weekday[0], weekday[j])
#         else:
#             print(weekday[j],weekday[j+1])
#     else:
#         j=calendar.weekday(year,1,1)
#         print(weekday[j])
#
# if __name__ == '__main__':
#     i=int(input())
#     year_select(i)
weekday=["monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
def year_select(year):
    # 求出一年有多少天
    days=366 if calendar.isleap(year) else 365

    # 求出一年的第一天是星期几
    begin_index=calendar.weekday(year,1,1)

    #求出余下几天
    rest=days%7

    #返回结果
    if rest==1:
        return [weekday[begin_index]]
    elif rest==2:
        if begin_index==6:
            return [weekday[0],weekday[begin_index]]
        else:
            return [weekday[begin_index],weekday[begin_index+1]]

if __name__ == '__main__':
    data=int(input())
    print(year_select(data))





